test context
A test context is everything a system under test (SUT) needs to have in place in order to exercise it for the purpose of verifying its behavior. For this reason RSpec calls the test fixture (in xUnit) a "context".
Fixture: a set fruits with contents = {apple, orange, pear} Exercise: remove orange from the fruits set Verify: fruits set contents = {apple, pear}Inline code sample
In this example, the fixture is comprised of a single set and it is created directly in the test. But how we choose to construct the fixture has very far-reaching ramifications on all aspects of test writing and maintenance.
Copyright © 2003-2008 Gerard Meszaros all rights reserved